#define  _CRT_SECURE_NO_WARNINGS 1


#include<iostream>
using namespace std;
class Solution {
public:
    bool isPalindrome(string s) {
        string s1;
        for (auto ch : s) {
            if (isalnum(ch)) {
                s1 += tolower(ch);
            }
        }
        string s1_rev(s1.rbegin(), s1.rend());
        return s1 == s1_rev;
    }
};